<!DOCTYPE html>
<html>
<head lang="en">
    <meta charset="UTF-8">
    <title>parseInt的应用</title>
</head>
<body>
<script type="text/javascript">
    <!--
    var op1=prompt("请输入第一个数:","")
    var op2=prompt("请输入第二个数:","")
    var p1=parseInt(op1);
    var p2=parseInt(op2);
    var result=p1+p2;
    document.write(p1+"+"+p2+"="+result);
    -->
</script>
</body>
</html>